﻿using System.Collections;
using System.Linq;
using Spring.Data.NHibernate.Support;

using Project.Model;
using NHibernate;
using System.Collections.Generic;

namespace Project.Repository
{
	public class ProvinceDao : Repository<Province>, IProvinceDao
	{
	}

	public class CityDao : Repository<City>, ICityDao
	{
		/// <summary>
		/// 获取指定省份下的所有城市
		/// </summary>
		/// <returns></returns>
		public virtual IList<City> GetAllByProvince(string provinceCode)
		{
			 IList<City> citys = this.FindByNamedQuery("City.ByProvinceCode", provinceCode, NHibernateUtil.String);
			 return citys;

		}

	}
}
